﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomType.aspx.cs" Inherits="ZX.WebApp.DeskTop.CustomType" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Styles/deskTopStyle.css" rel="stylesheet" type="text/css" />
    <script language="javascript">
        var AddTabPage = function (title, id1, id2) {
            var IsDept = document.getElementById("IsDept").value; //部门ID
            if (IsDept == "" || IsDept == "0") { 
                parent.parent.addTabs(title, "../../Extend/YUIList.aspx?entity=V_CrmCustomerInfo&order=Code&functionID=1a345cf2-7cf9-47a9-9a23-49006079a9a0&condition=" + window.encodeURIComponent("CustomUser='" + id1 + "' and TypeId='" + id2 + "'"));
            } else {
                parent.parent.addTabs(title, "../../Extend/YUIList.aspx?entity=V_CrmCustomerInfo&order=Code&functionID=1a345cf2-7cf9-47a9-9a23-49006079a9a0&condition=" + window.encodeURIComponent("CustomUser in(select  userid  from fn_GetOrganizeUser('" + IsDept + "')) and TypeId='" + id2 + "'"));
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input type="hidden" id="IsDept" runat="server" />
        <asp:Repeater ID="Repeater1" runat="server">
            <HeaderTemplate>
                <table class="tableContent" cellspacing='0'>
                    <tr>
                        <th style=" width:35%; border-left:1px solid #C1DAD7;">
                            客户类型
                        </th>
                        <th style=" width:14%">
                            总计
                        </th>
                        <th style=" width:17%">
                            本月新增
                        </th>
                        <th style=" width:17%">
                            本季新增
                        </th>
                        <th style=" width:17%">
                            本年新增
                        </th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td style='border-left:1px solid #C1DAD7;'>
                        <%# DataBinder.Eval(Container.DataItem, "TypeName")%>类客户
                    </td>
                    <%--<td><a href="#" onclick="parent.parent.addTabs('我的客户','../Crm/Customer/ListCustomerInfo.aspx?action=list&functionID=1a345cf2-7cf9-47a9-9a23-49006079a9a0');"><%# DataBinder.Eval(Container.DataItem, "typesum")%></a></td>--%>
                    <td>
                        <a style="text-decoration:underline;" href="#" onclick="javascript:AddTabPage('我的客户','<%=strUserId %>','<%# DataBinder.Eval(Container.DataItem, "TypeId")%>');">
                            <%# DataBinder.Eval(Container.DataItem, "typesum")%></a>
                    </td>
                    <td>
                         <%# DataBinder.Eval(Container.DataItem, "[MonthNum]")%>
                    </td>
                    <td>
                         <%# DataBinder.Eval(Container.DataItem, "[QqNum]")%>
                    </td>
                    <td>
                         <%# DataBinder.Eval(Container.DataItem, "[YearNum]")%>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        <asp:Label ID="Label1" runat="server" Visible="false"></asp:Label>
    </div>
    </form>
</body>
</html>
